<?php
////FORMMAIL
define('_MYMAIL_', 'contato@gabrielguelfi.com.br');
//define('_MYMAIL_', 'gabriel.valguelfi@gmail.com');
$mailed = 'false';

function formmail() {
    $subject = 'Enviado pelo formmail do site: ' . $_REQUEST[assunto];
    $message = '
        --------------------------------------------------
                    Remetente:' . $_REQUEST[nome] . '
                    E-mail: ' . $_REQUEST[email] . '
                    Telefone: ' . $_REQUEST[telefone] . '
        --------------------------------------------------
        
                        
                    ' . $_REQUEST[mensagem];

    if (mail(_MYMAIL_, $subject, $message)) {
        return 'true';
    } else {
        return 'false';
    }
}

if ($_REQUEST[formmail] == 'true') {
    $mailed = formmail();
}
////FORMMAIL

$currentPage = (isset($_REQUEST[currentPage]) ? $_REQUEST[currentPage] : 'home');
$flashVars = 'currentPage=' . $currentPage . '&mailed=' . $mailed;
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Gabriel Valentoni Guelfi | Portfolio oficial</title>
        <style>
            body{background-color:#f0f0f0;}

            #website{
                border-color: #999999;
                border-style: solid;
                border-width: 1px;
                width:1300px;
                height:770px;
            }
        </style>
        <script>
            function resize(_width){
                var width = _width + "px";
                var height = _width * 0.592307692;
                document.getElementById("website").style.width = width;
                document.getElementById("website").style.height = height + "px";
            }
            window.onload = function(){
                resize(screen.availWidth * 0.975);
            }
            window.onresize = function(){
                resize(screen.availWidth * 0.975);
            }
        </script>
        <meta name="google-site-verification" content="J-5geA50g3xYm5f8xUVQyZys--q9VzQpwJJhZwXdpRs" />
    </head>
    <body>
        <object id="website" type="application/x-shockwave-flash" data="flash/preloader.swf">
            <param name="movie" value="flash/preloader.swf"/>
            <param name="allowFullScreen" value="false"/>
            <param name="allowScriptAccess" value="sameDomain"/>
            <param name="quality" value="high"/>
            <param name="wmode" value="solid"/>
            <param name="pluginspace" value="http://www.macromedia.com/go/getflashplayer"/>
            <param name="FlashVars" value="<?php echo $flashVars; ?>"/>
        </object>
    </body>
</html>